package com.handa.admin.userservice.websocket.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class WebsocketDataBody {

    // 消息类型
    private Integer type;

    // 消息数据体
    private Object data;

    private String msg;

    // 消息来自 用户 信息
    private String fromUserId;

    private String fromUserName;

    private String fromNickName;

    private String fromSessionId;

    // 消息发送给 用户 信息
    private String toUserId;

    private String toUserName;

    private String toNickName;

    private String toSessionId;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

}
